package components.game {
	import UIUtils.uif_utilBitmap;
	
	import classes.clt_loader;
	
	import data.clt_data;
	
	import flash.events.Event;

	public class clt_stikers {
		private static var _list: Object = {};
		public static function createStikerImage(id: int, a_width: Number, postLoadFunc: Function): void {
			if (_list.hasOwnProperty(id)) 
				postLoadFunc(uif_utilBitmap.copyBitmapData(_list[id], a_width/_list[id].contentLoaderInfo.width));
			else {
				var loader: clt_loader = new clt_loader(null, clt_servers.STIKERS_URL + id + clt_data.PNGEXT, function(e: Event): void {
					_list[id] = loader;
					postLoadFunc(uif_utilBitmap.copyBitmapData(_list[id], a_width/loader.contentLoaderInfo.width));
				});
			}
		}
	}
}